
package com.feib.soeasy.dao;

import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.feib.soeasy.model.Group;
import com.feib.soeasy.pagination.PaginatedList;


/**
 * @title (#)GroupDaoTester.java<br>
 * @description <br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2011/1/31 create by Jimmy Liu<br>
 */
public class GroupDaoTester {

    private static ApplicationContext context;
    
    private static GroupDao groupDao;
    
    protected Logger logger = LoggerFactory.getLogger(this.getClass());
    
    @BeforeClass
    public static void runBeforeClass()
    {
        context = new FileSystemXmlApplicationContext(new String[] {
                        "classpath:applicationContext-config.xml"
                        , "classpath:applicationContext-dao.xml"
                        , "classpath:applicationContext-hibernate.xml"
                        , "classpath:applicationContext-job.xml"
        });

        groupDao = (GroupDao) context.getBean("groupDao");

    }
    
    @Test
    public void testQueryGroup()
    {
        Group group = new Group();
        group.setGroupNo("360798880001");
        
        PaginatedList<Group> paginationConfig = new PaginatedList<Group>();
        
        System.out.println(groupDao.queryPaginationByGroupvirtualAccountNo(group, null, paginationConfig).getPaginatedList());
    }

}
